<?php

namespace Biz\model\activity;

class DigTreasure extends \Doraemon\pockets\datebase\BaseDbModel
{
    const _CONFIG_FILE_ = 'db_shop';

    const _CONFIG_SELECT_ = 'db_activity';

    const _DATABASE_ = 'shop_activity';

    const _TABLE_NAME = 'activity_dig_treasure';



    public static function inserData($data)
    {
        $data['addtime'] = date("Y-m-d H:i:s");
        if (self::insert($data)->rowcount()) {
            return self::id();
        } else {
            return false;
        }
    }


    public static function getByUid($uid , $wiki_id)
    {
        return self::get("*" , ['uid' => $uid , $wiki_id]);
    }
}